﻿#ifndef FILETHREAD_H
#define FILETHREAD_H

#include <QObject>
#include <QThread>
#include <QTimer>
#include "filetrans_socket.h"
#include <QFile>

class FileThread: public QThread
{
    Q_OBJECT
public:
    FileThread(QString filepath,QString filename,FileTrans_Socket*& sock,uint filesize);
    QString m_filepath;
    QString m_filename;
    FileTrans_Socket* m_sock;
    void sendFileData();
    void run() override;
    uint m_filesize;
    uint m_sendsize;
    QTimer m_timer1;
    QFile m_file;
};

#endif // FILETHREAD_H
